package com.boot.unity.api.wx.utils;

import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.json.WxGsonBuilder;

import java.io.Serializable;

public class WxOcrIdCardResults implements Serializable {
    private static final long serialVersionUID = 8184352486986729980L;
    @SerializedName("type")
    private String type;
    @SerializedName("name")
    private String name;
    @SerializedName("id")
    private String id;
    @SerializedName("addr")
    private String addr;
    @SerializedName("gender")
    private String gender;
    @SerializedName("nationality")
    private String nationality;
    @SerializedName("valid_date")
    private String validDate;

    public static WxOcrIdCardResults fromJson(String json) {
        return (WxOcrIdCardResults) WxGsonBuilder.create().fromJson(json, WxOcrIdCardResults.class);
    }

    public WxOcrIdCardResults() {
    }

    public String getType() {
        return this.type;
    }

    public String getName() {
        return this.name;
    }

    public String getId() {
        return this.id;
    }

    public String getValidDate() {
        return this.validDate;
    }

    public String getAddr() {
        return addr;
    }

    public String getGender() {
        return gender;
    }

    public String getNationality() {
        return nationality;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setValidDate(String validDate) {
        this.validDate = validDate;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public void setNationality(String nationality) {
        this.nationality = nationality;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof WxOcrIdCardResults)) {
            return false;
        } else {
            WxOcrIdCardResults other = (WxOcrIdCardResults) o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59:
                {
                    Object this$type = this.getType();
                    Object other$type = other.getType();
                    if (this$type == null) {
                        if (other$type == null) {
                            break label59;
                        }
                    } else if (this$type.equals(other$type)) {
                        break label59;
                    }

                    return false;
                }

                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$id = this.getId();
                Object other$id = other.getId();
                if (this$id == null) {
                    if (other$id != null) {
                        return false;
                    }
                } else if (!this$id.equals(other$id)) {
                    return false;
                }

                Object this$validDate = this.getValidDate();
                Object other$validDate = other.getValidDate();
                if (this$validDate == null) {
                    if (other$validDate != null) {
                        return false;
                    }
                } else if (!this$validDate.equals(other$validDate)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof WxOcrIdCardResults;
    }


    public String toString() {
        return "WxOcrIdCardResult(type=" + this.getType() + ", name=" + this.getName() + ", id=" + this.getId() + ", addr=" + this.getAddr() + ", gender=" + this.getGender()+ ", nationality=" + this.getNationality()+ ", validDate=" + this.getValidDate() + ")";
    }
}
